package com.sunwayworld.basemodule.common.auditrecord.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.sunwayworld.framework.context.LocalContextHelper;
import com.sunwayworld.framework.data.annotation.Id;
import com.sunwayworld.framework.data.annotation.Table;
import com.sunwayworld.framework.data.annotation.Transient;
import com.sunwayworld.framework.support.domain.AbstractPersistable;
import com.sunwayworld.framework.support.domain.Insertable;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 通用操作记录
 */
@Table("T_LIMS_AUDIT_RECORD")
public class LimsAuditRecordBean extends AbstractPersistable<Long> implements Insertable<Long>{

    @Transient
    private static final long serialVersionUID = -82566196618711043L;
    
    @Id
    private Long id;//主键
    private String businessId;//关联主表ID
    private String businessCode;//业务编码
    private String auditById;//操作人编码
    private String auditByName;//操作人名称
    private String auditStep;//操作界面
    private String auditOperation;//操作步骤
    private String remarks;//备注
    private String otherParam;//其他参数


    private String createdById;//制单人编码
    private String createdByName;//制单人名称
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;//制单时间
    private String createdByOrgId;//制单人单位编码
    private String createdByOrgName;//制单人单位名称

    public LimsAuditRecordBean() {
    }

    public LimsAuditRecordBean(Long id, String businessId, String businessCode, String auditStep, String auditOperation, String remarks) {
        this.id = id;
        this.businessId = businessId;
        this.businessCode = businessCode;
        this.auditStep = auditStep;
        this.auditById = LocalContextHelper.getLoginUserId();
        this.auditByName = LocalContextHelper.getLoginUserName();
        this.auditOperation = auditOperation;
        this.remarks = remarks;
    }

    @Override
    public Long getId() {
        return id;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }
    public String getBusinessCode() {
        return businessCode;
    }

    public void setBusinessCode(String businessCode) {
        this.businessCode = businessCode;
    }
    public String getAuditStep() {
        return auditStep;
    }

    public void setAuditStep(String auditStep) {
        this.auditStep = auditStep;
    }
    public String getAuditById() {
        return auditById;
    }

    public void setAuditById(String auditById) {
        this.auditById = auditById;
    }
    public String getAuditByName() {
        return auditByName;
    }

    public void setAuditByName(String auditByName) {
        this.auditByName = auditByName;
    }
    public String getAuditOperation() {
        return auditOperation;
    }

    public void setAuditOperation(String auditOperation) {
        this.auditOperation = auditOperation;
    }
    @Override
    public String getCreatedById() {
        return createdById;
    }

    @Override
    public void setCreatedById(String createdById) {
        this.createdById = createdById;
    }

    @Override
    public String getCreatedByName() {
        return createdByName;
    }

    @Override
    public void setCreatedByName(String createdByName) {
        this.createdByName = createdByName;
    }

    @Override
    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    @Override
    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    @Override
    public String getCreatedByOrgId() {
        return createdByOrgId;
    }

    @Override
    public void setCreatedByOrgId(String createdByOrgId) {
        this.createdByOrgId = createdByOrgId;
    }

    @Override
    public String getCreatedByOrgName() {
        return createdByOrgName;
    }

    @Override
    public void setCreatedByOrgName(String createdByOrgName) {
        this.createdByOrgName = createdByOrgName;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getOtherParam() {
        return otherParam;
    }

    public void setOtherParam(String otherParam) {
        this.otherParam = otherParam;
    }

}
